package com.jic.point.mapper;

import com.jic.point.model.entity.PublMemberBalance;
import com.jic.point.rest.request.SignData;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface PublMemberBalanceMapper {
	/**
	 * PUBL_MEMBER_BALANCE插入数据
	 * @param publMemberBalance 入参实体类
	 */
	int insert (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE插入数据
	 * @param publMemberBalance 入参实体类
	 */
	int insertSelective (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE根据表对象数据修改数据
	 * @param publMemberBalance 入参实体类
	 */
	int updateByPrimaryKey (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE根据表对象数据修改数据
	 * @param publMemberBalance 入参实体类
	 */
	int updateByPrimaryKeySelective (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE根据id删除数据
	 * @param publMemberBalance 入参实体类
	 */
	int deleteByPrimaryKey (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE根据主键查询数据
	 * @param publMemberBalance 入参实体类
	 */
	PublMemberBalance selectByPrimaryKey (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE根据主键查询数据
	 * @param publMemberBalance 入参实体类
	 */
	List<PublMemberBalance> listPageBySelective (PublMemberBalance publMemberBalance);

	/**
	 * PUBL_MEMBER_BALANCE查询数据
	 * @param publMemberBalance 入参实体类
	 */
	List<PublMemberBalance>  selectBySelective (PublMemberBalance publMemberBalance);

	List<PublMemberBalance> queryMemberByCode(PublMemberBalance member);

	PublMemberBalance ByUserIDPrimaryKey(PublMemberBalance publMemberBalance);

	Integer userIdByPrimaryKey(PublMemberBalance balance);

	Integer addPoint(PublMemberBalance member);

	PublMemberBalance selectByCode(@Param("memberCode") String memberCode);

    BigDecimal getUserPoint(@Param("id") Long id);
    List<PublMemberBalance> queryPublMemberBalanceByCode(SignData signData);
    int consumePoint(PublMemberBalance publMemberBalance);
}
